<?php


// 基于 ArrayAccess 功能的实现
// 看到 \vendor\laravel\framework\src\Illuminate\Foundation\Application.php 中有 $this['events'] 直接调用的用法。
// 但 $app 并没有这么一个属性。
// 这是利用了 ArrayAccess 接口的特性。
public function offsetGet($key)
{
    return $this->make($key);
}
// 此时会调用这个方法，继承自 \vendor\laravel\framework\src\Illuminate\Container\Container.php。















["path"]=>
string(50) "D:\project\study\study-php-laravel\laravel5331\app"
["path.base"]=>
string(46) "D:\project\study\study-php-laravel\laravel5331"
["path.lang"]=>
string(61) "D:\project\study\study-php-laravel\laravel5331\resources\lang"
["path.config"]=>
string(53) "D:\project\study\study-php-laravel\laravel5331\config"
["path.public"]=>
string(53) "D:\project\study\study-php-laravel\laravel5331\public"
["path.storage"]=>
string(54) "D:\project\study\study-php-laravel\laravel5331\storage"
["path.database"]=>
string(55) "D:\project\study\study-php-laravel\laravel5331\database"
["path.resources"]=>
string(56) "D:\project\study\study-php-laravel\laravel5331\resources"
["path.bootstrap"]=>
string(56) "D:\project\study\study-php-laravel\laravel5331\bootstrap"


["basePath":protected]=>
string(46) "D:\project\study\study-php-laravel\laravel5331"
["hasBeenBootstrapped":protected]=>
bool(false)
["booted":protected]=>
bool(false)

["serviceProviders":protected]=>
array(2) {
  [0]=>
  object(Illuminate\Events\EventServiceProvider)#2 (2) {
    ["app":protected]=>
    *RECURSION*
    ["defer":protected]=>
    bool(false)
  }
  [1]=>
  object(Illuminate\Routing\RoutingServiceProvider)#7 (2) {
    ["app":protected]=>
    *RECURSION*
    ["defer":protected]=>
    bool(false)
  }
}


["monologConfigurator":protected]=>
NULL
["databasePath":protected]=>
NULL
["storagePath":protected]=>
NULL
["environmentPath":protected]=>
NULL
["environmentFile":protected]=>
string(4) ".env"
["namespace":protected]=>
NULL
["resolved":protected]=>
array(1) {
  ["events"]=>
  bool(true)
}